{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1、导入必要的工具包"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np  # 矩阵操作\n",
    "import pandas as pd # SQL数据处理\n",
    "\n",
    "from sklearn.metrics import r2_score  #评价回归预测模型的性能\n",
    "\n",
    "import matplotlib.pyplot as plt   #画图\n",
    "import seaborn as sns\n",
    "\n",
    "# 图形出现在Notebook里而不是新窗口\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2. 读取数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>instant</th>\n",
       "      <th>season_1</th>\n",
       "      <th>season_2</th>\n",
       "      <th>season_3</th>\n",
       "      <th>season_4</th>\n",
       "      <th>mnth_1</th>\n",
       "      <th>mnth_2</th>\n",
       "      <th>mnth_3</th>\n",
       "      <th>mnth_4</th>\n",
       "      <th>mnth_5</th>\n",
       "      <th>...</th>\n",
       "      <th>weekday_6</th>\n",
       "      <th>temp</th>\n",
       "      <th>atemp</th>\n",
       "      <th>hum</th>\n",
       "      <th>windspeed</th>\n",
       "      <th>holiday</th>\n",
       "      <th>workingday</th>\n",
       "      <th>yr</th>\n",
       "      <th>cnt</th>\n",
       "      <th>log_cnt</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>0.355170</td>\n",
       "      <td>0.373517</td>\n",
       "      <td>0.828620</td>\n",
       "      <td>0.284606</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>985</td>\n",
       "      <td>6.893656</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0.379232</td>\n",
       "      <td>0.360541</td>\n",
       "      <td>0.715771</td>\n",
       "      <td>0.466215</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>801</td>\n",
       "      <td>6.687109</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0.171000</td>\n",
       "      <td>0.144830</td>\n",
       "      <td>0.449638</td>\n",
       "      <td>0.465740</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1349</td>\n",
       "      <td>7.207860</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0.175530</td>\n",
       "      <td>0.174649</td>\n",
       "      <td>0.607131</td>\n",
       "      <td>0.284297</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1562</td>\n",
       "      <td>7.354362</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0.209120</td>\n",
       "      <td>0.197158</td>\n",
       "      <td>0.449313</td>\n",
       "      <td>0.339143</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1600</td>\n",
       "      <td>7.378384</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 36 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   instant  season_1  season_2  season_3  season_4  mnth_1  mnth_2  mnth_3  \\\n",
       "0        1         1         0         0         0       1       0       0   \n",
       "1        2         1         0         0         0       1       0       0   \n",
       "2        3         1         0         0         0       1       0       0   \n",
       "3        4         1         0         0         0       1       0       0   \n",
       "4        5         1         0         0         0       1       0       0   \n",
       "\n",
       "   mnth_4  mnth_5    ...     weekday_6      temp     atemp       hum  \\\n",
       "0       0       0    ...             1  0.355170  0.373517  0.828620   \n",
       "1       0       0    ...             0  0.379232  0.360541  0.715771   \n",
       "2       0       0    ...             0  0.171000  0.144830  0.449638   \n",
       "3       0       0    ...             0  0.175530  0.174649  0.607131   \n",
       "4       0       0    ...             0  0.209120  0.197158  0.449313   \n",
       "\n",
       "   windspeed  holiday  workingday  yr   cnt   log_cnt  \n",
       "0   0.284606        0           0   0   985  6.893656  \n",
       "1   0.466215        0           0   0   801  6.687109  \n",
       "2   0.465740        0           1   0  1349  7.207860  \n",
       "3   0.284297        0           1   0  1562  7.354362  \n",
       "4   0.339143        0           1   0  1600  7.378384  \n",
       "\n",
       "[5 rows x 36 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv(\"FE_day_new.csv\")\n",
    "\n",
    "#通过观察前5行，了解数据每列（特征）的概况\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 从原始数据中分离输入特征x和输出y\n",
    "y = df[\"cnt\"]\n",
    "\n",
    "X = df.drop([\"cnt\", \"log_cnt\"], axis = 1)\n",
    "\n",
    "#特征名称，用于后续显示权重系数对应的特征\n",
    "feat_names = X.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(584, 34)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#将数据分割训练数据与测试数据\n",
    "from sklearn.model_selection import train_test_split\n",
    "\n",
    "# 随机采样20%的数据构建测试样本，其余作为训练样本\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=33, test_size=0.2)\n",
    "X_train.shape"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3、确定模型类型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>columns</th>\n",
       "      <th>coef</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>yr</td>\n",
       "      <td>4550.708897</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>temp</td>\n",
       "      <td>2654.792827</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>mnth_9</td>\n",
       "      <td>1287.992360</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>atemp</td>\n",
       "      <td>995.293778</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>mnth_10</td>\n",
       "      <td>929.887649</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>weathersit_1</td>\n",
       "      <td>914.410909</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>season_4</td>\n",
       "      <td>830.579518</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>mnth_12</td>\n",
       "      <td>586.296405</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>mnth_8</td>\n",
       "      <td>517.803038</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>weathersit_2</td>\n",
       "      <td>409.589079</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>mnth_11</td>\n",
       "      <td>407.138803</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>weekday_6</td>\n",
       "      <td>238.417312</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>workingday</td>\n",
       "      <td>216.956549</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>mnth_6</td>\n",
       "      <td>189.797216</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>season_2</td>\n",
       "      <td>85.141889</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>weekday_5</td>\n",
       "      <td>77.516263</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>weekday_3</td>\n",
       "      <td>66.464787</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>weekday_4</td>\n",
       "      <td>43.650546</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>mnth_5</td>\n",
       "      <td>5.009200</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>instant</td>\n",
       "      <td>-6.919060</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>weekday_2</td>\n",
       "      <td>-31.943212</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>season_3</td>\n",
       "      <td>-130.807162</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>weekday_0</td>\n",
       "      <td>-191.612446</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>weekday_1</td>\n",
       "      <td>-202.493250</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>mnth_7</td>\n",
       "      <td>-203.137582</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>holiday</td>\n",
       "      <td>-263.761415</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>mnth_4</td>\n",
       "      <td>-485.714239</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>mnth_3</td>\n",
       "      <td>-541.439917</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>season_1</td>\n",
       "      <td>-784.914245</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>windspeed</td>\n",
       "      <td>-1174.845790</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>mnth_2</td>\n",
       "      <td>-1207.111892</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>hum</td>\n",
       "      <td>-1298.592138</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>weathersit_3</td>\n",
       "      <td>-1323.999988</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>mnth_1</td>\n",
       "      <td>-1486.521042</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         columns         coef\n",
       "33            yr  4550.708897\n",
       "27          temp  2654.792827\n",
       "13        mnth_9  1287.992360\n",
       "28         atemp   995.293778\n",
       "14       mnth_10   929.887649\n",
       "17  weathersit_1   914.410909\n",
       "4       season_4   830.579518\n",
       "16       mnth_12   586.296405\n",
       "12        mnth_8   517.803038\n",
       "18  weathersit_2   409.589079\n",
       "15       mnth_11   407.138803\n",
       "26     weekday_6   238.417312\n",
       "32    workingday   216.956549\n",
       "10        mnth_6   189.797216\n",
       "2       season_2    85.141889\n",
       "25     weekday_5    77.516263\n",
       "23     weekday_3    66.464787\n",
       "24     weekday_4    43.650546\n",
       "9         mnth_5     5.009200\n",
       "0        instant    -6.919060\n",
       "22     weekday_2   -31.943212\n",
       "3       season_3  -130.807162\n",
       "20     weekday_0  -191.612446\n",
       "21     weekday_1  -202.493250\n",
       "11        mnth_7  -203.137582\n",
       "31       holiday  -263.761415\n",
       "8         mnth_4  -485.714239\n",
       "7         mnth_3  -541.439917\n",
       "1       season_1  -784.914245\n",
       "30     windspeed -1174.845790\n",
       "6         mnth_2 -1207.111892\n",
       "29           hum -1298.592138\n",
       "19  weathersit_3 -1323.999988\n",
       "5         mnth_1 -1486.521042"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 线性回归\n",
    "#class sklearn.linear_model.LinearRegression(fit_intercept=True, normalize=False, copy_X=True, n_jobs=1)\n",
    "from sklearn.linear_model import LinearRegression\n",
    "\n",
    "# 1.使用默认配置初始化学习器实例\n",
    "lr = LinearRegression()\n",
    "\n",
    "# 2.用训练数据训练模型参数\n",
    "lr.fit(X_train, y_train)\n",
    "\n",
    "# 3. 用训练好的模型对测试集进行预测\n",
    "y_test_pred_lr = lr.predict(X_test)\n",
    "y_train_pred_lr = lr.predict(X_train)\n",
    "\n",
    "\n",
    "# 看看各特征的权重系数，系数的绝对值大小可视为该特征的重要性\n",
    "fs = pd.DataFrame({\"columns\":list(feat_names), \"coef\":list((lr.coef_.T))})\n",
    "fs.sort_values(by=['coef'],ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The r2 score of LinearRegression on test is 0.8279474225980328\n",
      "The r2 score of LinearRegression on train is 0.8516480637403496\n"
     ]
    }
   ],
   "source": [
    "# 使用r2_score评价模型在测试集和训练集上的性能，并输出评估结果\n",
    "#测试集\n",
    "print('The r2 score of LinearRegression on test is', r2_score(y_test, y_test_pred_lr))\n",
    "#训练集\n",
    "print('The r2 score of LinearRegression on train is', r2_score(y_train, y_train_pred_lr))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAekAAAFsCAYAAADos0H8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAH7FJREFUeJzt3X+8VXWd7/HXRzhCIwKiYAg1YKH5G+xocEujKLXBxHncSrumNJL2sJprdWvSvOXp10xdvc3Nm9MMtx9i2ogy4+BMj2b0MjJO3tIBI9PQIJNECY6YP9BMwc/9Y6+DGziHs88vzpezX8/HYz/2Wt+19lrf9d3n7Pf5rvU9a0dmIkmSyrPPYFdAkiR1zpCWJKlQhrQkSYUypCVJKpQhLUlSoQxpSZIKZUir6UXE/RExe7DrMZgi4o8j4pGI2BIRM/bgfrdExKFdLHt/RPywn/bzcES8rT+2Je1JhrSGtM4+nHf+8M/MozJzeTfbmRIRGRHDB6iqg+1K4COZOSozf7LzwurYn61C9dGI+GpEDOvrTqv9PdTX7UhDlSEtFaCA8P9D4P5u1jkuM0cBbwbOAs4f8FpJTc6QVtOr721HxIkRsSIino6IjRHx1Wq1O6rnJ6ve5KyI2Cci/ntErIuITRFxbUSMqdvuedWyzRHxmZ320xYRSyLiuoh4Gnh/te8fRcSTEbEhIr4eEfvWbS8j4kMRsSYinomIL0TEa6rXPB0RN9avv9MxdlrXiBgREVuAYcBPI+KX3bVXZq4F7gSm121/TER8q6r3oxHxxY6edkS8NiL+LSKeiojHI2LxTsf02mr6wIi4pTqWu4HX1K23y5mMiFgeER+opl8TEf9atfXjEXF9RIztoi26eo+l4hjS0o6+BnwtM0dTC4kbq/KTq+ex1SnaHwHvrx5vAQ4FRgFfB4iII4G/As4BJgJjgEk77WsesAQYC1wPbAM+BhwEzALmAB/a6TWnAa8HZgJ/Biys9vEq4GjgvV0c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u15J3bBhAyeffDLTp0/n6KOP5t///d8bOqbly5dz+umnA9DW1sb555/P7NmzOfTQQ3cI7+uuu44TTzyR6dOn88EPfnB78F500UW0trZy1FFHbW8DqN3y+vOf/zxvetObuOmmHo2t7tYevXe3JKl827ZtY9myZSxYsACAW2+9lTVr1nD33XeTmZxxxhnccccdtLe3c8ghh/D9738fgKeeemqH7WzYsIHLL7+clStXMmbMGN7ylrcwY8aM3e575MiR3HzzzYwePZrHH3+cmTNncsYZZ+wwCOt73/sep556Kpdddhnbtm3jueee69VxPvDAA9x+++0888wzHH744Vx00UWsXbuWxYsXc+edd9LS0sKHPvQhrr/+es477zy+9KUvMW7cOLZt28acOXO49957OfbYY7fX+4c//GGv6rE7hrQkCYDf/e53TJ8+nYcffpjXv/71vP3tbwdqIX3rrbduD9gtW7awZs0aTjrpJD7xiU/wqU99itNPP52TTjpph+3dddddzJ49m47/7DnrrLP4xS9+sds6ZCaf/vSnueOOO9hnn3149NFH2bhxI6985Su3r3PCCSdw/vnn8+KLL3LmmWcyffr0Xh3v3LlzGTFiBCNGjGDChAls3LiRZcuWsXLlSk444YTtbTJhQu02IDfeeCMLFy5k69atbNiwgZ///OfbQ/qss87qVR264+luSRLw8jXpdevW8cILL2y/Jp2ZXHrppaxatYpVq1axdu1aFixYwGGHHcbKlSs55phjuPTSS/n85z+/yza7+jek4cOH89JLL23f/gsvvADA9ddfT3t7OytXrmTVqlUcfPDBu/yv8cknn8wdd9zBpEmTOPfcc7n22mt7dbwjRozYPj1s2DC2bt1KZjJ//vztx/rggw/S1tbGr371K6688kqWLVvGvffey9y5c3eo13777derOnTHnrSkTjU6uri/RyFr8I0ZM4arrrqKefPmcdFFF3Hqqafymc98hnPOOYdRo0bx6KOP0tLSwtatWxk3bhzve9/7GDVqFNdcc80O23nDG97AxRdfzObNmxk9ejQ33XQTxx13HFC7jrty5Ure8573sHTpUl588UWgdsp8woQJtLS0cPvtt7Nu3a7f6rhu3TomTZrEBRdcwLPPPss999zDeeed1y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gdxLXATMGKwj68H7fDH1P76/T2wkdofX03XDrtpn06Pdag8gL8FNgAvVj8HC6hdW1wGrKmex1Xr9vjzYW94AG+idkr23rrPgz9qpnYAjgV+UrXBfcBnq/JOf6eBkdX82mr5oXXb6vRzo68PbwsqSVKhmup0tyRJexNDWpKkQhnSkiQVypCWJKlQhrQkSYUypCVJKpQhLUlSof4/YGdWY/RHppMAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 504x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#在训练集上观察预测残差的分布，看是否符合模型假设：噪声为0均值的高斯噪声\n",
    "f, ax = plt.subplots(figsize=(7, 5)) \n",
    "f.tight_layout() \n",
    "ax.hist(y_train - y_train_pred_lr, bins=40, label='Residuals Linear', color='b', alpha=.5); \n",
    "ax.set_title(\"Histogram of Residuals\") \n",
    "ax.legend(loc='best');"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAARgAAADQCAYAAADcQn7hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJztnX+cVXWd8N+fGS5yEXUgqcUBAo2XrmaKsYmyz7OprWiWTqZpa7vklm7lbmI+JmztCmUrZfmj59Uvnqy1JIXMJpCKXLXtWfeBBAclFJI0kYFNWhgqmGSG+Tx/nO8Zztw559xz597v/THzeb9e85p7vvf8+Nwzcz73+/38FFXFMAzDB021FsAwjOGLKRjDMLxhCsYwDG+YgjEMwxumYAzD8IYpGMMwvGEKxjAMb5iCMQzDG6ZgDMPwxqhaC+CDY489VqdNm1ZrMQxj2LJhw4bfqurEYvsNSwUzbdo01q9fX2sxDGP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rb4Ft7ufqKsn/Vg57kY4n+MfdBnwXOMKNj3Hb29z7x0eO/4T7LFuBCz3Lejqw3t3rdgIvUF3fZ2AxsAX4BfBtAk9QXd/n8MdSBQzD8MZIXSIZhlEFTMEYhuENUzCGYXjDFIxhGN4wBWMYhjes8ZqRioiELlyAPwEOEYTbA7xFVQ/WQKY1wGWq+vtqX9soDXNTG5kRkUXAH1T18wXjQvC/1Bd7YOWuX5XrGJXDlkjGkBCRN7j6JF8FngKmiEhX5P0rReTr7vXrROQhEVkvIj93UbGF5/ugiHxfRNa4eiWfTLjOJBHZISIt7v2rXa2Wp0Xkm1mvZ1QHWyIZ5XAyQRTrhyJ5MXF8Eficqq512eIPA2+M2e8tbvwg8KQERaz+EL0OQDCRARE5DbgZOFtV94jIhBKvZ3jGFIxRDr9S1Scz7Pc24MRQMQDjRSSvqt0F+61R1b0AItJOkELx45TrnEtQUGkPQPi7hOsZnjEFY5TD/sjrPgaWBBgTeS1kMwgXGgTD7f2FO0bOG2dEzHo9wzNmgzEqgjO87hWRGSLSBLwr8va/AdeFGyJyesJpzpegZu5YghooTxS57L8RZAhPcOedEBnPcj3DM6ZgjEpyM8GS5lGC+iMh1wFznDH2WeCahOP/g6C+bwdwv6puTLuYqj5DUE/3ZyKyEbi9xOsZnjE3tVEXiMgHgTeq6vxay2JUDpvBGIbhDZvBGIbhDZvBGIbhDVMwhmF4wxSMYRjeMAVjGIY3TMEYhuGN/w/szMaHHgUcXgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 288x216 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#还可以观察预测值与真值的散点图\n",
    "plt.figure(figsize=(4, 3))\n",
    "plt.scatter(y_train, y_train_pred_lr)\n",
    "plt.plot([-3, 3], [-3, 3], '--k')   #数据已经标准化，3倍标准差即可\n",
    "plt.axis('tight')\n",
    "plt.xlabel('True price')\n",
    "plt.ylabel('Predicted price')\n",
    "plt.tight_layout()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 3.2 正则化的线性回归（L2正则 --> 岭回归）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The r2 score of RidgeCV on test is 0.8289740672769019\n",
      "The r2 score of RidgeCV on train is 0.849770002972564\n"
     ]
    }
   ],
   "source": [
    "#岭回归／L2正则\n",
    "#class sklearn.linear_model.RidgeCV(alphas=(0.1, 1.0, 10.0), fit_intercept=True, \n",
    "#                                  normalize=False, scoring=None, cv=None, gcv_mode=None, \n",
    "#                                  store_cv_values=False)\n",
    "from sklearn.linear_model import  RidgeCV\n",
    "\n",
    "#1. 设置超参数（正则参数）范围\n",
    "alphas = [ 0.01, 0.1, 1, 10,100]\n",
    "#n_alphas = 20\n",
    "#alphas = np.logspace(-5,2,n_alphas)\n",
    "\n",
    "#2. 生成一个RidgeCV实例\n",
    "ridge = RidgeCV(alphas=alphas, store_cv_values=True)  \n",
    "\n",
    "#3. 模型训练\n",
    "ridge.fit(X_train, y_train)    \n",
    "\n",
    "#4. 预测\n",
    "y_test_pred_ridge = ridge.predict(X_test)\n",
    "y_train_pred_ridge = ridge.predict(X_train)\n",
    "\n",
    "\n",
    "# 评估，使用r2_score评价模型在测试集和训练集上的性能\n",
    "print('The r2 score of RidgeCV on test is', r2_score(y_test, y_test_pred_ridge))\n",
    "print('The r2 score of RidgeCV on train is', r2_score(y_train, y_train_pred_ridge))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 可视化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaEAAAEKCAYAAAC7c+rvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cG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LJ9zOin/e8TfTdyX9191ozexG4l+gP+/eIrmh5Jtjnl0RD6XV3f9vMfk/0CssfABs7GecCMMPMtgfP88Uu6von4EUze4ToVa4vxDx2T1CDSFLpKtoiITKzQR5dSXME0XdH84OA6k80GOYHnyUl8lzn3X1QL9X1W2CJu5/qjecT6YzeCYmE6xdmNgwoAL7r7rUA7n7JzJ4GxgGHU1lQcMrw7xRAkgp6JyQiIqHRxAQREQmNQkhEREKjEBIRkdAohEREJDQKIRERCY1CSEREQvP/ATWnwxJ6S762AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "alpha is: 1.0\n"
     ]
    }
   ],
   "source": [
    "mse_mean = np.mean(ridge.cv_values_, axis = 0)\n",
    "plt.plot(np.log10(alphas), mse_mean.reshape(len(alphas),1)) \n",
    "\n",
    "#这是为了标出最佳参数的位置，不是必须\n",
    "#plt.plot(np.log10(ridge.alpha_)*np.ones(3), [0.28, 0.29, 0.30])\n",
    "\n",
    "plt.xlabel('log(alpha)')\n",
    "plt.ylabel('mse')\n",
    "plt.show()\n",
    "\n",
    "print ('alpha is:', ridge.alpha_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>columns</th>\n",
       "      <th>coef_lr</th>\n",
       "      <th>coef_ridge</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>yr</td>\n",
       "      <td>4550.708897</td>\n",
       "      <td>1504.623924</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>temp</td>\n",
       "      <td>2654.792827</td>\n",
       "      <td>1778.493414</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>mnth_9</td>\n",
       "      <td>1287.992360</td>\n",
       "      <td>678.352931</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>atemp</td>\n",
       "      <td>995.293778</td>\n",
       "      <td>1546.374034</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>mnth_10</td>\n",
       "      <td>929.887649</td>\n",
       "      <td>84.873020</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>weathersit_1</td>\n",
       "      <td>914.410909</td>\n",
       "      <td>914.843092</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>season_4</td>\n",
       "      <td>830.579518</td>\n",
       "      <td>767.205317</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>mnth_12</td>\n",
       "      <td>586.296405</td>\n",
       "      <td>-824.928596</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>mnth_8</td>\n",
       "      <td>517.803038</td>\n",
       "      <td>205.686009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>weathersit_2</td>\n",
       "      <td>409.589079</td>\n",
       "      <td>388.865215</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>mnth_11</td>\n",
       "      <td>407.138803</td>\n",
       "      <td>-725.828529</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>weekday_6</td>\n",
       "      <td>238.417312</td>\n",
       "      <td>227.515740</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>workingday</td>\n",
       "      <td>216.956549</td>\n",
       "      <td>212.558710</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>mnth_6</td>\n",
       "      <td>189.797216</td>\n",
       "      <td>369.663154</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>season_2</td>\n",
       "      <td>85.141889</td>\n",
       "      <td>110.998614</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>weekday_5</td>\n",
       "      <td>77.516263</td>\n",
       "      <td>81.396550</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>weekday_3</td>\n",
       "      <td>66.464787</td>\n",
       "      <td>59.857933</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>weekday_4</td>\n",
       "      <td>43.650546</td>\n",
       "      <td>62.795850</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>mnth_5</td>\n",
       "      <td>5.009200</td>\n",
       "      <td>387.713628</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>instant</td>\n",
       "      <td>-6.919060</td>\n",
       "      <td>1.417157</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>weekday_2</td>\n",
       "      <td>-31.943212</td>\n",
       "      <td>-34.140080</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>season_3</td>\n",
       "      <td>-130.807162</td>\n",
       "      <td>-91.388275</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>weekday_0</td>\n",
       "      <td>-191.612446</td>\n",
       "      <td>-191.851510</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>weekday_1</td>\n",
       "      <td>-202.493250</td>\n",
       "      <td>-205.574484</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>mnth_7</td>\n",
       "      <td>-203.137582</td>\n",
       "      <td>-242.548582</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>holiday</td>\n",
       "      <td>-263.761415</td>\n",
       "      <td>-248.222941</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>mnth_4</td>\n",
       "      <td>-485.714239</td>\n",
       "      <td>106.306513</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>mnth_3</td>\n",
       "      <td>-541.439917</td>\n",
       "      <td>298.550050</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>season_1</td>\n",
       "      <td>-784.914245</td>\n",
       "      <td>-786.815656</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>windspeed</td>\n",
       "      <td>-1174.845790</td>\n",
       "      <td>-1087.773198</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>mnth_2</td>\n",
       "      <td>-1207.111892</td>\n",
       "      <td>-143.125249</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>hum</td>\n",
       "      <td>-1298.592138</td>\n",
       "      <td>-1142.397276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>weathersit_3</td>\n",
       "      <td>-1323.999988</td>\n",
       "      <td>-1303.708307</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>mnth_1</td>\n",
       "      <td>-1486.521042</td>\n",
       "      <td>-194.714350</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         columns      coef_lr   coef_ridge\n",
       "33            yr  4550.708897  1504.623924\n",
       "27          temp  2654.792827  1778.493414\n",
       "13        mnth_9  1287.992360   678.352931\n",
       "28         atemp   995.293778  1546.374034\n",
       "14       mnth_10   929.887649    84.873020\n",
       "17  weathersit_1   914.410909   914.843092\n",
       "4       season_4   830.579518   767.205317\n",
       "16       mnth_12   586.296405  -824.928596\n",
       "12        mnth_8   517.803038   205.686009\n",
       "18  weathersit_2   409.589079   388.865215\n",
       "15       mnth_11   407.138803  -725.828529\n",
       "26     weekday_6   238.417312   227.515740\n",
       "32    workingday   216.956549   212.558710\n",
       "10        mnth_6   189.797216   369.663154\n",
       "2       season_2    85.141889   110.998614\n",
       "25     weekday_5    77.516263    81.396550\n",
       "23     weekday_3    66.464787    59.857933\n",
       "24     weekday_4    43.650546    62.795850\n",
       "9         mnth_5     5.009200   387.713628\n",
       "0        instant    -6.919060     1.417157\n",
       "22     weekday_2   -31.943212   -34.140080\n",
       "3       season_3  -130.807162   -91.388275\n",
       "20     weekday_0  -191.612446  -191.851510\n",
       "21     weekday_1  -202.493250  -205.574484\n",
       "11        mnth_7  -203.137582  -242.548582\n",
       "31       holiday  -263.761415  -248.222941\n",
       "8         mnth_4  -485.714239   106.306513\n",
       "7         mnth_3  -541.439917   298.550050\n",
       "1       season_1  -784.914245  -786.815656\n",
       "30     windspeed -1174.845790 -1087.773198\n",
       "6         mnth_2 -1207.111892  -143.125249\n",
       "29           hum -1298.592138 -1142.397276\n",
       "19  weathersit_3 -1323.999988 -1303.708307\n",
       "5         mnth_1 -1486.521042  -194.714350"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 看看各特征的权重系数，系数的绝对值大小可视为该特征的重要性\n",
    "fs = pd.DataFrame({\"columns\":list(feat_names), \"coef_lr\":list((lr.coef_.T)), \"coef_ridge\":list((ridge.coef_.T))})\n",
    "fs.sort_values(by=['coef_lr'],ascending=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 3.3 正则化的线性回归（L1正则 --> Lasso）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The r2 score of LassoCV on test is 0.47062572154686666\n",
      "The r2 score of LassoCV on train is 0.4427527534180157\n"
     ]
    }
   ],
   "source": [
    "#### Lasso／L1正则\n",
    "# class sklearn.linear_model.LassoCV(eps=0.001, n_alphas=100, alphas=None, fit_intercept=True, \n",
    "#                                    normalize=False, precompute=’auto’, max_iter=1000, \n",
    "#                                    tol=0.0001, copy_X=True, cv=None, verbose=False, n_jobs=1,\n",
    "#                                    positive=False, random_state=None, selection=’cyclic’)\n",
    "from sklearn.linear_model import LassoCV\n",
    "\n",
    "#1. 设置超参数搜索范围\n",
    "#alphas = [ 0.01, 0.1, 1, 10,100]\n",
    "\n",
    "#2. 生成学习器实例\n",
    "#lasso = LassoCV(alphas=alphas)\n",
    "\n",
    "#1. 设置超参数搜索范围\n",
    "#Lasso可以自动确定最大的alpha，所以另一种设置alpha的方式是设置最小的alpha值（eps） 和 超参数的数目（n_alphas），\n",
    "#然后LassoCV对最小值和最大值之间在log域上均匀取值n_alphas个\n",
    "# np.logspace(np.log10(alpha_max * eps), np.log10(alpha_max),num=n_alphas)[::-1]\n",
    "\n",
    "#2 生成LassoCV实例（默认超参数搜索范围）\n",
    "lasso = LassoCV()  \n",
    "\n",
    "#3. 训练（内含CV）\n",
    "lasso.fit(X_train, y_train)  \n",
    "\n",
    "#4. 测试\n",
    "y_test_pred_lasso = lasso.predict(X_test)\n",
    "y_train_pred_lasso = lasso.predict(X_train)\n",
    "\n",
    "\n",
    "# 评估，使用r2_score评价模型在测试集和训练集上的性能\n",
    "print('The r2 score of LassoCV on test is', r2_score(y_test, y_test_pred_lasso))\n",
    "print('The r2 score of LassoCV on train is', r2_score(y_train, y_train_pred_lasso))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaEAAAEKCAYAAAC7c+rvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3XmcXVWd9/vPt4bMMylCyECCCUKYAhQhiKKAYqC7CdrSxqcb0jTKfRAfh8fuFux7mxcOfbXtVhuv8kgrLwNNG5FBIoJ0ZBC1gaQSCCEESAEhKTJVqMpQGapSVb/7x1kFh7KmhJyza/i+X6/zOnv/9tprrZ2TnF/22uvsrYjAzMwsCyVZd8DMzAYuJyEzM8uMk5CZmWXGScjMzDLjJGRmZplxEjIzs8w4CZmZWWachMzMLDNOQmZmlpmyrDvQ240fPz6mTZuWdTfMzPqUFStWbI+Iiu7KOQl1Y9q0aVRVVWXdDTOzPkXSaz0p5+E4MzPLjJOQmZllxknIzMwy4yRkZmaZcRIyM7PMOAmZmVlmnITMzCwzTkJmZvZHvvubl/hD9faCt+MkZGZmb7Nz3wH+7eF1VK2vL3hbTkJmZvY2T2+oJwIqp40teFtOQmZm9jYrXquntETMnjKm4G0VLAlJGiJpmaRVktZIujHFJenrkl6StFbSZ/PiN0mqlvSspNPz6looaV16LcyLnyFpddrnJklK8XGSlqbySyWN7a4NMzPLqVpfzwkTRzJ8cOFvL1rIM6FG4PyIOBWYDcyTNBf4a2AKcHxEnAAsTuUvAmam19XAzZBLKMANwFnAHOCGtqSSylydt9+8FL8OeDgiZgIPp/VO2zAzs5zmllae2biDymPGFaW9giWhyGlIq+XpFcA1wFciojWV25bKzAduS/s9CYyRNBH4MLA0Iuoioh5YSi6hTQRGRcQTERHAbcCleXUtSsuL2sU7asPMzIC1m3ez70ALZxxT+OtBUOBrQpJKJT0DbCOXSJ4C3g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maWGSchMzPLjJOQmZllxknIzMwy4yRkZmaZcRIyM7PM/P9ToG3xHPTlsQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "alpha is: 256.4697701374553\n"
     ]
    }
   ],
   "source": [
    "mses = np.mean(lasso.mse_path_, axis = 1)\n",
    "plt.plot(np.log10(lasso.alphas_), mses) \n",
    "#plt.plot(np.log10(lasso.alphas_)*np.ones(3), [0.3, 0.4, 1.0])\n",
    "plt.xlabel('log(alpha)')\n",
    "plt.ylabel('mse')\n",
    "plt.show()    \n",
    "            \n",
    "print ('alpha is:', lasso.alpha_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>columns</th>\n",
       "      <th>coef_lr</th>\n",
       "      <th>coef_ridge</th>\n",
       "      <th>coef_lasso</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>yr</td>\n",
       "      <td>4550.708897</td>\n",
       "      <td>1504.623924</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>temp</td>\n",
       "      <td>2654.792827</td>\n",
       "      <td>1778.493414</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>mnth_9</td>\n",
       "      <td>1287.992360</td>\n",
       "      <td>678.352931</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>atemp</td>\n",
       "      <td>995.293778</td>\n",
       "      <td>1546.374034</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>mnth_10</td>\n",
       "      <td>929.887649</td>\n",
       "      <td>84.873020</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>weathersit_1</td>\n",
       "      <td>914.410909</td>\n",
       "      <td>914.843092</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>season_4</td>\n",
       "      <td>830.579518</td>\n",
       "      <td>767.205317</td>\n",
       "      <td>-0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>mnth_12</td>\n",
       "      <td>586.296405</td>\n",
       "      <td>-824.928596</td>\n",
       "      <td>-0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>mnth_8</td>\n",
       "      <td>517.803038</td>\n",
       "      <td>205.686009</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>weathersit_2</td>\n",
       "      <td>409.589079</td>\n",
       "      <td>388.865215</td>\n",
       "      <td>-0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>mnth_11</td>\n",
       "      <td>407.138803</td>\n",
       "      <td>-725.828529</td>\n",
       "      <td>-0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>weekday_6</td>\n",
       "      <td>238.417312</td>\n",
       "      <td>227.515740</td>\n",
       "      <td>-0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>workingday</td>\n",
       "      <td>216.956549</td>\n",
       "      <td>212.558710</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>mnth_6</td>\n",
       "      <td>189.797216</td>\n",
       "      <td>369.663154</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>season_2</td>\n",
       "      <td>85.141889</td>\n",
       "      <td>110.998614</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>weekday_5</td>\n",
       "      <td>77.516263</td>\n",
       "      <td>81.396550</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>weekday_3</td>\n",
       "      <td>66.464787</td>\n",
       "      <td>59.857933</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>weekday_4</td>\n",
       "      <td>43.650546</td>\n",
       "      <td>62.795850</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>mnth_5</td>\n",
       "      <td>5.009200</td>\n",
       "      <td>387.713628</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>instant</td>\n",
       "      <td>-6.919060</td>\n",
       "      <td>1.417157</td>\n",
       "      <td>5.456671</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>weekday_2</td>\n",
       "      <td>-31.943212</td>\n",
       "      <td>-34.140080</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>season_3</td>\n",
       "      <td>-130.807162</td>\n",
       "      <td>-91.388275</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>weekday_0</td>\n",
       "      <td>-191.612446</td>\n",
       "      <td>-191.851510</td>\n",
       "      <td>-0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>weekday_1</td>\n",
       "      <td>-202.493250</td>\n",
       "      <td>-205.574484</td>\n",
       "      <td>-0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>mnth_7</td>\n",
       "      <td>-203.137582</td>\n",
       "      <td>-242.548582</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>holiday</td>\n",
       "      <td>-263.761415</td>\n",
       "      <td>-248.222941</td>\n",
       "      <td>-0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>mnth_4</td>\n",
       "      <td>-485.714239</td>\n",
       "      <td>106.306513</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>mnth_3</td>\n",
       "      <td>-541.439917</td>\n",
       "      <td>298.550050</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>season_1</td>\n",
       "      <td>-784.914245</td>\n",
       "      <td>-786.815656</td>\n",
       "      <td>-341.190505</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>windspeed</td>\n",
       "      <td>-1174.845790</td>\n",
       "      <td>-1087.773198</td>\n",
       "      <td>-0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>mnth_2</td>\n",
       "      <td>-1207.111892</td>\n",
       "      <td>-143.125249</td>\n",
       "      <td>-0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>hum</td>\n",
       "      <td>-1298.592138</td>\n",
       "      <td>-1142.397276</td>\n",
       "      <td>-0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>weathersit_3</td>\n",
       "      <td>-1323.999988</td>\n",
       "      <td>-1303.708307</td>\n",
       "      <td>-0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>mnth_1</td>\n",
       "      <td>-1486.521042</td>\n",
       "      <td>-194.714350</td>\n",
       "      <td>-0.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         columns      coef_lr   coef_ridge  coef_lasso\n",
       "33            yr  4550.708897  1504.623924    0.000000\n",
       "27          temp  2654.792827  1778.493414    0.000000\n",
       "13        mnth_9  1287.992360   678.352931    0.000000\n",
       "28         atemp   995.293778  1546.374034    0.000000\n",
       "14       mnth_10   929.887649    84.873020    0.000000\n",
       "17  weathersit_1   914.410909   914.843092    0.000000\n",
       "4       season_4   830.579518   767.205317   -0.000000\n",
       "16       mnth_12   586.296405  -824.928596   -0.000000\n",
       "12        mnth_8   517.803038   205.686009    0.000000\n",
       "18  weathersit_2   409.589079   388.865215   -0.000000\n",
       "15       mnth_11   407.138803  -725.828529   -0.000000\n",
       "26     weekday_6   238.417312   227.515740   -0.000000\n",
       "32    workingday   216.956549   212.558710    0.000000\n",
       "10        mnth_6   189.797216   369.663154    0.000000\n",
       "2       season_2    85.141889   110.998614    0.000000\n",
       "25     weekday_5    77.516263    81.396550    0.000000\n",
       "23     weekday_3    66.464787    59.857933    0.000000\n",
       "24     weekday_4    43.650546    62.795850    0.000000\n",
       "9         mnth_5     5.009200   387.713628    0.000000\n",
       "0        instant    -6.919060     1.417157    5.456671\n",
       "22     weekday_2   -31.943212   -34.140080    0.000000\n",
       "3       season_3  -130.807162   -91.388275    0.000000\n",
       "20     weekday_0  -191.612446  -191.851510   -0.000000\n",
       "21     weekday_1  -202.493250  -205.574484   -0.000000\n",
       "11        mnth_7  -203.137582  -242.548582    0.000000\n",
       "31       holiday  -263.761415  -248.222941   -0.000000\n",
       "8         mnth_4  -485.714239   106.306513    0.000000\n",
       "7         mnth_3  -541.439917   298.550050    0.000000\n",
       "1       season_1  -784.914245  -786.815656 -341.190505\n",
       "30     windspeed -1174.845790 -1087.773198   -0.000000\n",
       "6         mnth_2 -1207.111892  -143.125249   -0.000000\n",
       "29           hum -1298.592138 -1142.397276   -0.000000\n",
       "19  weathersit_3 -1323.999988 -1303.708307   -0.000000\n",
       "5         mnth_1 -1486.521042  -194.714350   -0.000000"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 看看各特征的权重系数，系数的绝对值大小可视为该特征的重要性\n",
    "fs = pd.DataFrame({\"columns\":list(feat_names), \"coef_lr\":list((lr.coef_.T)), \"coef_ridge\":list((ridge.coef_.T)), \"coef_lasso\":list((lasso.coef_.T))})\n",
    "fs.sort_values(by=['coef_lr'],ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
